#include <ProbabilityEvent.h>

ProbabilityEvent::ProbabilityEvent(const float occurProbability)
:occurProbability(occurProbability)
{

}

float ProbabilityEvent::operator !() const
{
    return 1 - occurProbability;
}

float ProbabilityEvent::operator &(const ProbabilityEvent& rightEvent) const
{
    return  occurProbability * rightEvent.occurProbability;
}

float ProbabilityEvent::operator |(const ProbabilityEvent& rightEvent) const
{
    return occurProbability+rightEvent.occurProbability - occurProbability * rightEvent.occurProbability;
} 
